package com.qf.business.goods.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.business.goods.mapper.GoodsNormsMapper;
import com.qf.business.goods.service.GoodsNormsService;
import com.qf.business.goods.service.GoodsNormsValService;
import com.qf.data.goods.entity.GoodsNorms;
import com.qf.data.goods.entity.GoodsNormsVal;
import com.qf.data.goods.vo.output.NormsOutput;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (GoodsNorms)表服务实现类
 *
 * @author makejava
 * @since 2022-07-07 00:03:35
 */
@Service
public class GoodsNormsServiceImpl extends ServiceImpl<GoodsNormsMapper,GoodsNorms> implements GoodsNormsService {

    @Autowired
    private GoodsNormsMapper goodsNormsMapper;

    @Autowired
    private GoodsNormsValService goodsNormsValService;

    @Override
    public List<NormsOutput> queryList() {
        return goodsNormsMapper.queryList();
    }

    @Override
    public List<GoodsNormsVal> queryListVal(Long normsId) {
       List<GoodsNormsVal> valOutputs =goodsNormsValService.query().eq("norms_id",normsId).list();
        return valOutputs;
    }

    @Override
    public List<NormsOutput> queryListBySid(Long sid) {
       return goodsNormsMapper.queryListBySid(sid);
    }
}

